About this document

This document represents a preview of an ongoing research project. The content included herein reflects a selection of material drawn from the full research study and is provided solely for demonstration and review purposes. The remaining sections of the study are currently under development. All findings, analyses, and conclusions presented in this preliminary version are provisional subject to refinement in the final publication.

Introduction

This technical report presents a focused analysis with fully reproducible R code, providing a transparent and systematic approach to the data and results. It it part of the main report, which readers are encouraged to consult for additional context and background information. All analyses here have been conducted in R, ensuring that workflows, visualizations, and computations can be reproduced and extended as needed.

PHASE B - Exploration

In phase B the data will be pulled into R and tidy it so in later phases (descriptive analysis, modelling, policy scenarios) it will run smoothly. The data is loaded and inspected from IMF WEO (World Economic Outlook). The countries of interest for comparisons are: Suriname, Norway, Timor-Leste, Ghana, Guyana and Azerbaijan.

# Step 1. Load and inspect IMF WEO (WORLD ECONOMIC OUTLOOK) data

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.1     ✔ stringr   1.5.2
## ✔ ggplot2   4.0.0     ✔ tibble    3.3.0
## ✔ lubridate 1.9.4     ✔ tidyr     1.3.1
## ✔ purrr     1.1.0     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(tidyr)
library(ggplot2)
library(countrycode)
library(dplyr)
library(readxl)
library(janitor)
## 
## Attaching package: 'janitor'
## 
## The following objects are masked from 'package:stats':
## 
##     chisq.test, fisher.test
## Rows: 8,626
## Columns: 61
## $ `WEO Country Code`              <dbl> 512, 512, 512, 512, 512, 512, 512, 512…
## $ ISO                             <chr> "AFG", "AFG", "AFG", "AFG", "AFG", "AF…
## $ `WEO Subject Code`              <chr> "NGDP_R", "NGDP_RPCH", "NGDP", "NGDPD"…
## $ Country                         <chr> "Afghanistan", "Afghanistan", "Afghani…
## $ `Subject Descriptor`            <chr> "Gross domestic product, constant pric…
## $ `Subject Notes`                 <chr> "Expressed in billions of national cur…
## $ Units                           <chr> "National currency", "Percent change",…
## $ Scale                           <chr> "Billions", "Units", "Billions", "Bill…
## $ `Country/Series-specific Notes` <chr> "Source: National Statistics Office La…
## $ `1980`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1981`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1982`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1983`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1984`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1985`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1986`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1987`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1988`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1989`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1990`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1991`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1992`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1993`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1994`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1995`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1996`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1997`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1998`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `1999`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `2000`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `2001`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `2002`                          <chr> "453.48399999999998", "n/a", "178.756"…
## $ `2003`                          <chr> "492.90300000000002", "8.6920000000000…
## $ `2004`                          <chr> "496.209", "0.67100000000000004", "246…
## $ `2005`                          <chr> "554.91", "11.83", "304.92599999999999…
## $ `2006`                          <chr> "584.65800000000002", "5.3609999999999…
## $ `2007`                          <chr> "662.65", "13.34", "427.495", "8.55599…
## $ `2008`                          <chr> "688.24699999999996", "3.863", "517.50…
## $ `2009`                          <chr> "829.92399999999998", "20.585000000000…
## $ `2010`                          <chr> "899.95600000000002", "8.4380000000000…
## $ `2011`                          <chr> "958.26599999999996", "6.4790000000000…
## $ `2012`                          <chr> "1092.1179999999999", "13.968", "1033.…
## $ `2013`                          <chr> "1154.1780000000001", "5.6829999999999…
## $ `2014`                          <chr> "1185.306", "2.6970000000000001", "118…
## $ `2015`                          <chr> "1197.0119999999999", "0.9879999999999…
## $ `2016`                          <chr> "1222.9169999999999", "2.1640000000000…
## $ `2017`                          <chr> "1255.288", "2.6469999999999998", "128…
## $ `2018`                          <chr> "1270.2159999999999", "1.1890000000000…
## $ `2019`                          <dbl> 1319.902, 3.912, 1469.596, 18.876, 97.…
## $ `2020`                          <chr> "1288.8689999999999", "-2.351", "1547.…
## $ `2021`                          <chr> "1101.4449999999999", "-14.542", "1251…
## $ `2022`                          <chr> "1032.712", "-6.24", "1283.442", "14.5…
## $ `2023`                          <chr> "1056.123", "2.2669999999999999", "135…
## $ `2024`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `2025`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `2026`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `2027`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `2028`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `2029`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `2030`                          <chr> "n/a", "n/a", "n/a", "n/a", "n/a", "n/…
## $ `Estimates Start After`         <dbl> 2024, 2024, 2024, 2024, 2024, 2024, 20…

The following table contains all the (raw) data for the countries of interest.

weo_core

This is where the data coverage for Suriname is being checked.

#checking coverage for Suriname (what is missing)
library(naniar)
weo_core %>%
  filter(country == "Suriname") %>%
  miss_var_summary()

Data table for Suriname only.

# Focus only on Suriname
sur <- weo_core %>% filter(country == "Suriname")
sur

B.2 - PART 2: Suriname Fiscal - Revenue, Spending, Debt (% of GDP)

This section gathers the fiscal indicators of interest: government revenue, total expenditure and gross debt then plot’s them.

# PART 2: Fiscal Indicators (% of GDP) 
# Define fiscal indicators
fiscal_indicators <- c("General government revenue", 
                       "General government total expenditure",
                       "General government gross debt")

# Prepare wide-format data
df_fiscal <- sur %>%
  filter(subject_descriptor %in% fiscal_indicators) %>%
  mutate(
    variable = case_when(
      subject_descriptor == "General government revenue" ~ "gov_revenue_gdp",
      subject_descriptor == "General government total expenditure" ~ "gov_expenditure_gdp",
      subject_descriptor == "General government gross debt" ~ "gov_debt_gdp"
    ),
    value = coalesce(gov_revenue_gdp, gov_expenditure_gdp, gov_debt_gdp)
  ) %>%
  select(year, variable, value) %>%
  pivot_wider(
    names_from = variable,
    values_from = value
  )
df_fiscal
# Plot Fiscal Indicators
p_sur_fisc <- df_fiscal %>%
  drop_na() %>%
  ggplot(aes(x = year)) +
  geom_line(aes(y = gov_revenue_gdp, color = "Revenue (% GDP)")) +
  geom_line(aes(y = gov_expenditure_gdp, color = "Expenditure (% GDP)")) +
  geom_line(aes(y = gov_debt_gdp, color = "Debt (% GDP)")) +
  labs(
    title = "Suriname: Fiscal Indicators",
    x = "Year", y = "% of GDP",
    color = "Indicator"
  ) +
  scale_color_manual(values = c("Revenue (% GDP)" = "#1C86EE", "Expenditure (% GDP)" = "#00CD66","Debt (% GDP)" = "#EE2C2C")) +
  theme_minimal()+
  theme(legend.position = "bottom", text = element_text(family = "serif"))

p_sur_fisc

B.2.1 - Benchmark all countries fiscal - Revenue, Spending, Debt (% of GDP)

# Define fiscal indicators of interest
fiscal_indicators <- c("General government revenue", 
                       "General government total expenditure",
                       "General government gross debt")

# Prepare dataset
df_fiscal_all <- weo_core %>%
  filter(country %in% peer_countries,
         subject_descriptor %in% fiscal_indicators) %>%
  mutate(
    indicator = case_when(
      subject_descriptor == "General government revenue" ~ "Revenue (% GDP)",
      subject_descriptor == "General government total expenditure" ~ "Expenditure (% GDP)",
      subject_descriptor == "General government gross debt" ~ "Debt (% GDP)"
    ),
    value = coalesce(gov_revenue_gdp, gov_expenditure_gdp, gov_debt_gdp)
  ) %>%
  select(country, year, indicator, value)

# Plot
p_all_fisc <- ggplot(df_fiscal_all, aes(x = year, y = value, color = country)) +
  geom_line() +
  facet_wrap(~ indicator, scales = "free_y") +
  scale_color_manual(values = country_colors)+
  labs(
    title = "Fiscal Indicators (% GDP): Resource-Rich Countries",
    x = "Year", y = "% of GDP",
    color = "Country"
  ) +
  theme_minimal()+
  theme(legend.position = "bottom", text = element_text(family = "serif"))
p_all_fisc

# Faceted by country
# Prepare data (same as before)
df_fiscal_all <- weo_core %>%
  filter(country %in% peer_countries,
         subject_descriptor %in% fiscal_indicators) %>%
  mutate(
    indicator = case_when(
      subject_descriptor == "General government revenue" ~ "Revenue (% GDP)",
      subject_descriptor == "General government total expenditure" ~ "Expenditure (% GDP)",
      subject_descriptor == "General government gross debt" ~ "Debt (% GDP)"
    ),
    value = coalesce(gov_revenue_gdp, gov_expenditure_gdp, gov_debt_gdp)
  ) %>%
  select(country, year, indicator, value)

# Plot with facets by country
p_all_fisc_2 <- ggplot(df_fiscal_all, aes(x = year, y = value, color = indicator)) +
  geom_line() + 
  facet_wrap(~ country, scales = "free_y") +
  labs(
    title = "Fiscal Indicators (% GDP): Country Comparison",
    x = "Year", y = "% of GDP",
    color = "Indicator"
  ) +
  scale_color_manual(values = c("Revenue (% GDP)" = "#1C86EE", "Expenditure (% GDP)" = "#00CD66","Debt (% GDP)" = "#EE2C2C")) +
  theme_minimal()+
  theme(legend.position = "bottom", text = element_text(family = "serif"))


p_all_fisc_2

PHASE C - Descriptive and Comparative Analysis

This phase moves beyond descriptive plots and starts analysing patterns, thus transitioning from descriptive data exploration to structured comparative analysis. The guiding inquiry is:

What can Suriname learn from other resource-rich economies about managing oil revenues for sustainable growth?

The cleaned IMF data will be used to build a combined macro–fiscal panel data set (all relevant countries and indicators in tidy format). That will allow us to run regressions and deeper comparisons.

#We want one tidy panel dataset with all countries, 
#all years, and all key indicators in columns.

# Step 0. Pivot wide IMF data (with year columns) into tidy long format first
weo_long <- weo %>%
  clean_names() %>%
  mutate(across(matches("^x\\d{4}"), as.numeric)) %>%
  pivot_longer(
    cols = matches("^x\\d{4}"),
    names_to = "year",
    values_to = "value"
  ) %>%
  mutate(year = as.integer(sub("x", "", year)))


library(dplyr)
library(tidyr)
library(janitor)

# Step 1. Select indicators of interest
key_indicators <- c(
  "Gross domestic product, constant prices",    # GDP growth (Percent change)
  "Inflation, average consumer prices",         # Inflation (Percent change)
  "General government revenue",                 # Gov revenue (% GDP)
  "General government total expenditure",       # Gov expenditure (% GDP)
  "General government gross debt",              # Gov debt (% GDP)
  "Current account balance"                     # Current account (% GDP)
)


# Step 2. Filter for countries + indicators
panel_raw <- weo_long %>%
  filter(country %in% peer_countries,
         subject_descriptor %in% key_indicators)

# Step 3. Map to clean variable names
panel_tidy <- panel_raw %>%
  mutate(
    variable = case_when(
      subject_descriptor == "Gross domestic product, constant prices" ~ "gdp_growth",
      subject_descriptor == "Inflation, average consumer prices" ~ "inflation",
      subject_descriptor == "General government revenue" ~ "gov_revenue_gdp",
      subject_descriptor == "General government total expenditure" ~ "gov_expenditure_gdp",
      subject_descriptor == "General government gross debt" ~ "gov_debt_gdp",
      subject_descriptor == "Current account balance" ~ "current_account_gdp"
    )
  ) %>%
  select(country, year, variable, value)

# Step 4. Clean numeric + collapse duplicates
panel <- panel_tidy %>%
  group_by(country, year, variable) %>%
  summarise(value = mean(as.numeric(value), na.rm = TRUE), .groups = "drop") %>%
  pivot_wider(names_from = variable, values_from = value)

#This panel object is the clean country-year data set with proper numeric values.
#From here, we can start exploring trends, correlations, and regressions.

panel

C.1 - Descriptive Exploration (vizual atls)

A combination of macroeconomic and fiscal indicators shown together.

library(dplyr)
library(ggplot2)

indicator_labels <- c(
  current_account_gdp = "Account Balance (% of GDP)",
  gdp_growth = "GDP Growth (%)",
  inflation = "Inflation (%)",
  gov_revenue_gdp = "Revenue (% of GDP)",
  gov_expenditure_gdp = "Expenditure (% of GDP)",
  gov_debt_gdp = "Debt (% of GDP)",
  fiscal_balance_gdp = "Fiscal Balance (% of GDP)"
)

panel_long <- panel %>%
  mutate(across(-c(country, year), as.character)) %>%
  pivot_longer(
    cols = -c(country, year),
    names_to = "indicator",
    values_to = "value"
  ) %>%
  mutate(
    value = as.numeric(value),
    indicator = dplyr::recode(indicator, !!!indicator_labels)
  )

panel_long
# Define custom colors for each country
country_colors <- c(
  "Suriname" = "#32CD32",   
  "Guyana" = "#1C86EE",     
  "Timor-Leste" = "#FF3E96",    
  "Azerbaijan" = "#FF7F00",  
  "Norway" = "#EE2C2C",
  "Ghana"= "#00BFFF" 
)

p_macro_fisc <- ggplot(panel_long, aes(x = year, y = value, group = country)) +
  geom_line(aes(color = country,
                size = (country == "Suriname"))) +
  scale_size_manual(values = c("TRUE" = 1.5, "FALSE" = 0.7), guide = "none") +
  scale_color_manual(values = country_colors) +  # assign custom colors
  facet_wrap(~ indicator, scales = "free_y") +
  labs(
    title = "Macro-Fiscal Indicators Over Time",
    subtitle = "Suriname highlighted (thicker line)",
    x = "Year", y = "Value",
    color = "Country"
  ) +
  theme_minimal() +
  theme(legend.position = "bottom", text = element_text(family = "serif"))

p_macro_fisc

Here are the same fiscal indicator plots on a logarithmic scale directly compare Suriname’s fiscal performance with peers.

# 1. Long format and relab
df_fiscal <- panel_long |>
  filter(indicator %in% c("Revenue (% of GDP)", 
                          "Expenditure (% of GDP)", 
                          "Debt (% of GDP)")) |>
  mutate(
    year = as.numeric(year)
  )

df_fiscal
# 2. Plot
p_fisc <- ggplot(df_fiscal, aes(x = year, y = value, group = country)) +
  geom_line(aes(color = country, size = (country == "Suriname"))) +
  scale_size_manual(values = c("TRUE" = 1.5, "FALSE" = 0.7), guide = "none") +
  scale_color_manual(values = country_colors) +  # assign custom colors
  scale_y_log10(labels = scales::label_number()) +
  facet_wrap(~ indicator, scales = "free_y") +
  labs(
    title = "Fiscal Indicators Across Countries",
    subtitle = "Suriname highlighted (thicker line)",
    x = "Year", y = "% of GDP",
    color = "Country"
  ) +
  theme_minimal() +
  theme(legend.position = "bottom", text = element_text(family = "serif"))

p_fisc

C.2 - Coverage Heatmap (data completeness)

For each indicator–country–year cell, check if the data is or is not available (NA).

# 1. Pivot long
#panel_long 

# 2. Coverage summary (non-NA percentage)
coverage <- panel_long %>%
  group_by(country, indicator) %>%
  summarise(
    coverage = mean(!is.na(value)) * 100,
    .groups = "drop"
  )

# 3. Plot Heat map
coverage |> ggplot(aes(indicator, country, fill = coverage))+
  geom_tile(color = "white") +
    geom_text(aes(label = ifelse(coverage >= 50, round(coverage, 0), "")), color = "white", size = 3)+
  scale_fill_gradient2(mid = "#EE2C2C", high = "#9ACD32", midpoint = 50,
                       name = "Coverage (%)") +
  labs(
    title = "Data Coverage Heatmap",
    subtitle = "Share of non-missing values per indicator and country",
    x = "Indicator", y = "Country"
  ) +
  theme_minimal(base_size = 12, base_family = "serif") +
  theme(
    axis.text.x = element_text(angle = 45, hjust = 1),
    panel.grid = element_blank()
  )

C.3 - Stylized Facts

We move beyond line plots and start exploring relationships between variables. this will set us up for the econometric phase. First, a panel regression of fiscal sustainability (Revenue vs Debt (% GDP) is performed.

C.3.1 Revenue vs. Debt (% GDP)

First, a panel regression of Revenue vs Debt (% GDP) (fiscal sustainability) is performed to answer the question: what is the relationship between government revenue and government debt levels across countries?

## `geom_smooth()` using formula = 'y ~ x'

C.3.2 Growth vs. Fiscal Balance (% GDP)

Second, fiscal Balance is analysed (fiscal stance vs. growth). To do this, first fiscal balanced is defined as the difference between government revenue and expenditure (% of GDP).

panel <- panel|> mutate(fiscal_balance_gdp = gov_revenue_gdp - gov_expenditure_gdp)
df_gdp_fiscal <- panel |>
  select(country, year, gdp_growth, fiscal_balance_gdp)

df_gdp_fiscal
# Time-Series Fiscal Balance
p_fiscal_balance <- df_gdp_fiscal %>%
  ggplot(aes(year,fiscal_balance_gdp, group = country)) +
  geom_line(aes(color = country, size = (country == "Suriname"))) +
  scale_color_manual(values = country_colors) + 
  scale_size_manual(values = c("TRUE" = 1.2, "FALSE" = 0.5), guide = "none") +
  labs(
    title = "Fiscal Balance (% GDP) Over Time",
    x = "Year",
    y = "Fiscal Balance (% GDP) [revenue - expenditure]",
    color = "Country"
  ) +
  theme_minimal(base_family = "serif")

p_fiscal_balance

# GDP Growth vs Fiscal Balance
p_growth_fiscal <- panel %>%
  ggplot(aes(x = gdp_growth, y = fiscal_balance_gdp)) +
  geom_point(aes(color = country, size = (country == "Suriname")), alpha = 0.7) +
  geom_smooth(method = "lm", se = FALSE, color = "darkgrey", linetype = "dashed", size = 0.5) +
  scale_color_manual(values = country_colors) +  
  scale_size_manual(values = c("TRUE" = 4, "FALSE" = 2), guide = "none") +
  labs(
    title = "GDP Growth vs. Fiscal Balance (% GDP)",
    x = "GDP Growth (%)",
    y = "Fiscal Balance (% GDP)",
    color = "Country"
  ) +
  theme_minimal(base_family = "serif")

p_growth_fiscal
## `geom_smooth()` using formula = 'y ~ x'

# Combine the graphs
library(gridExtra)
## 
## Attaching package: 'gridExtra'
## 
## The following object is masked from 'package:dplyr':
## 
##     combine
grid.arrange(p_fiscal_balance, p_growth_fiscal, ncol = 1)
## `geom_smooth()` using formula = 'y ~ x'

C.4 - Foundations of Econometric Analysis

#Start with a panel regression of government debt (% GDP)
#on fiscal balance (% GDP) across countries.
#Using predominantly plm() instead of lm()

if (!requireNamespace("plm", quietly = TRUE)) install.packages("plm")
library(plm)
## 
## Attaching package: 'plm'
## The following objects are masked from 'package:dplyr':
## 
##     between, lag, lead
# 1) Prepare regression data (explicitly drop NA)
df_reg <- panel %>%
  select(country, year, gov_debt_gdp, fiscal_balance_gdp) %>%
  filter(!is.na(gov_debt_gdp) & !is.na(fiscal_balance_gdp))

# 2) Panel fixed-effects regression (existing "global" test)
pdata <- pdata.frame(df_reg, index = c("country", "year"))
model_debt_fb <- plm(gov_debt_gdp ~ fiscal_balance_gdp, data = pdata, model = "within")
summary(model_debt_fb)   # use this for inference (FE slope is main object of interest)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp, data = pdata, 
##     model = "within")
## 
## Unbalanced Panel: n = 6, T = 30-51, N = 233
## 
## Residuals:
##     Min.  1st Qu.   Median  3rd Qu.     Max. 
## -406.853 -140.846  -15.331   21.761  803.316 
## 
## Coefficients:
##                    Estimate Std. Error t-value  Pr(>|t|)    
## fiscal_balance_gdp  1.56849    0.18613  8.4269 4.167e-15 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    12396000
## Residual Sum of Squares: 9432400
## R-Squared:      0.23909
## Adj. R-Squared: 0.21889
## F-statistic: 71.0132 on 1 and 226 DF, p-value: 4.1673e-15
# 3) Pooled OLS (ordinary least squares) (for plotting a single "global" line)
model_pooled_lm <- lm(gov_debt_gdp ~ fiscal_balance_gdp, data = df_reg)
summary(model_pooled_lm)
## 
## Call:
## lm(formula = gov_debt_gdp ~ fiscal_balance_gdp, data = df_reg)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -475.47 -145.82 -109.23   48.55 1092.94 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        164.1746    16.7712   9.789   <2e-16 ***
## fiscal_balance_gdp   1.8381     0.1742  10.549   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 250.7 on 231 degrees of freedom
## Multiple R-squared:  0.3251, Adjusted R-squared:  0.3222 
## F-statistic: 111.3 on 1 and 231 DF,  p-value: < 2.2e-16
# 4) Suriname-only OLS
df_sur <- df_reg %>% filter(country == "Suriname")
model_sur <- lm(gov_debt_gdp ~ fiscal_balance_gdp, data = df_sur)
summary(model_sur)
## 
## Call:
## lm(formula = gov_debt_gdp ~ fiscal_balance_gdp, data = df_sur)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -34.76 -29.21 -19.44  32.66  71.90 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         41.4962     6.2696   6.619 7.18e-08 ***
## fiscal_balance_gdp  -0.4806     1.4275  -0.337    0.738    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 38.68 on 39 degrees of freedom
## Multiple R-squared:  0.002898,   Adjusted R-squared:  -0.02267 
## F-statistic: 0.1133 on 1 and 39 DF,  p-value: 0.7382
# 5) Plot: Suriname scatter + Suriname fit + pooled global fit
ggplot(df_sur, aes(x = fiscal_balance_gdp, y = gov_debt_gdp)) +
  geom_point(color = "#32CD32", size = 2, alpha = 0.75) +
  geom_smooth(method = "lm", se = FALSE, color = "#EE2C2C", linetype = "dashed", size = 0.5) + # Suriname fit
  geom_abline(
    intercept = coef(model_pooled_lm)[1],
    slope     = coef(model_pooled_lm)[2],
    color     = "darkgrey", #global line
    linetype  = "dashed",
    size      = 0.5
  ) +
  coord_cartesian(ylim = c(0, 180)) +  # adjust this based on intercept size
  labs(
    title = "Suriname: Debt vs Fiscal Balance — Suriname vs Global",
    subtitle = "Red dashed = Suriname OLS | Black solid = Pooled OLS (all countries)",
    x = "Fiscal Balance (% GDP)",
    y = "Government Debt (% GDP)"
  ) +
  theme_minimal(base_family = "serif")
## `geom_smooth()` using formula = 'y ~ x'

As can be seen in the graph above, Suriname deviated from the global (pooled) slope which is positive, while Suriname’s slope is negative. What is expected: the slope on fiscal_balance_gdp should be negative: higher fiscal balance (surplus) should lead to lower debt ratios. Norway is most likely biasing the data (explained in the report).

C.4.1 Sensitivity check - Is Norway driving the global slope?

In order to verify this, the global regression is run without Norway and the slope and significance is compared to the baseline model.

# Checking Norway's impact and rerun the global regression
df_reg_no_norway <- df_reg %>% filter(country != "Norway")

model_debt_fb_no_norway <- plm(
  gov_debt_gdp ~ fiscal_balance_gdp,
  data = df_reg_no_norway,
  index = c("country", "year"),
  model = "within"
)

The baseline model

summary(model_debt_fb) #slope 1.56849
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp, data = pdata, 
##     model = "within")
## 
## Unbalanced Panel: n = 6, T = 30-51, N = 233
## 
## Residuals:
##     Min.  1st Qu.   Median  3rd Qu.     Max. 
## -406.853 -140.846  -15.331   21.761  803.316 
## 
## Coefficients:
##                    Estimate Std. Error t-value  Pr(>|t|)    
## fiscal_balance_gdp  1.56849    0.18613  8.4269 4.167e-15 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    12396000
## Residual Sum of Squares: 9432400
## R-Squared:      0.23909
## Adj. R-Squared: 0.21889
## F-statistic: 71.0132 on 1 and 226 DF, p-value: 4.1673e-15

The baseline model without Norway

summary(model_debt_fb_no_norway) #slope -4.78468 (flipped!)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp, data = df_reg_no_norway, 
##     model = "within", index = c("country", "year"))
## 
## Unbalanced Panel: n = 5, T = 30-41, N = 182
## 
## Residuals:
##     Min.  1st Qu.   Median  3rd Qu.     Max. 
## -459.887  -48.656  -18.474   17.520  758.398 
## 
## Coefficients:
##                    Estimate Std. Error t-value  Pr(>|t|)    
## fiscal_balance_gdp -4.78468    0.38696 -12.365 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    4813000
## Residual Sum of Squares: 2575600
## R-Squared:      0.46486
## Adj. R-Squared: 0.44966
## F-statistic: 152.888 on 1 and 176 DF, p-value: < 2.22e-16

The model for Suriname

summary(model_sur) #slope -0.4806
## 
## Call:
## lm(formula = gov_debt_gdp ~ fiscal_balance_gdp, data = df_sur)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -34.76 -29.21 -19.44  32.66  71.90 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         41.4962     6.2696   6.619 7.18e-08 ***
## fiscal_balance_gdp  -0.4806     1.4275  -0.337    0.738    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 38.68 on 39 degrees of freedom
## Multiple R-squared:  0.002898,   Adjusted R-squared:  -0.02267 
## F-statistic: 0.1133 on 1 and 39 DF,  p-value: 0.7382

What this means for Suriname: 1. Globally (without Norway), fiscal discipline (better balance) is strongly linked to lower debt burdens. 2. Suriname’s negative slope matches the global sign now — earlier, Norway was biasing the global slope positive. 3. This validates that Suriname actually behaves similarly to other resource economies: when balance improves, debt falls.

#So Norway was driving the global slope. We continue without Norway
#for it is biasing the data

# 3. Visualization: Suriname vs Global (no Norway)
ggplot(df_sur, aes(x = fiscal_balance_gdp, y = gov_debt_gdp)) +
  geom_point(color = "#32CD32", size = 3, alpha = 0.5) +
  
  # Suriname fit
  geom_smooth(method = "lm", se = FALSE, color = "#EE2C2C", linetype = "dashed", size = 0.5) +
  
  # Global fit (no Norway)
  geom_abline(
    slope = coef(model_debt_fb_no_norway)[1],
    color = "blue",
    linetype = "dashed"
  ) +
  
  # Global fit (All countries)
  geom_abline(
    intercept = coef(model_pooled_lm)[1],
    slope = coef(model_pooled_lm)[2],
    color = "darkgrey",
    linetype = "dashed"
  ) +
  coord_cartesian(ylim = c(-20, 200)) +  # adjust this based on intercept size
  labs(
    title = "Debt vs Fiscal Balance (% GDP): Suriname vs Global (excl. Norway)",
    subtitle = "Red = Suriname | Black = Global average | Blue = Global average without Norway",
    x = "Fiscal Balance (% GDP)",
    y = "Government Debt (% GDP)"
  ) +
  theme_minimal(base_family = "serif")
## `geom_smooth()` using formula = 'y ~ x'

The corrected global model (without Norway) will be used as the main comparison for Suriname going forward.

C.4.2 Extending the model with controls

In this subsection, the model will be extended with controls to see if the negative slope (more fiscal deficit leading to higher debt) remains significant once we account for other drivers.

# Extend the model with controls to check if the debt-balance relationship holds
# after controlling for these.
# Candidate control variables: GDP Growth, Inflation, Natural Resource rents,
# First data need to be imported from the Natural resource rents data from WDI
# because it's not in the IMF WOE Dataset.


# Install & load package if not yet done for WDI data: Natural resource rents (% GDP)
# Indicator code: NY.GDP.TOTL.RT.ZS for Natural resource rents

if (!requireNamespace("WDI", quietly = TRUE)) install.packages("WDI")
library(plm)
library(WDI)
library(dplyr)

# Note! The WDI API can be very unstable with temporary outages 
# — these happen every few weeks, and are usually fix themselves within 24–72 hours.
# Therefore, the data frame from previous runs was saves as a separate object and imported
# so the code would not break down. 
# The code to download it from the worldbank is commented.
# The comments can be removed to download it. from the WDI API

# wdi_rents <- WDI(
#  country = "all",
#  indicator = "NY.GDP.TOTL.RT.ZS",
#  start = max(panel$year, na.rm = TRUE),
#  end   = max(panel$year, na.rm = TRUE),
#  extra = FALSE,
#  cache = NULL
#)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp, data = df_reg_no_norway, 
##     model = "within", index = c("country", "year"))
## 
## Unbalanced Panel: n = 5, T = 30-41, N = 182
## 
## Residuals:
##     Min.  1st Qu.   Median  3rd Qu.     Max. 
## -459.887  -48.656  -18.474   17.520  758.398 
## 
## Coefficients:
##                    Estimate Std. Error t-value  Pr(>|t|)    
## fiscal_balance_gdp -4.78468    0.38696 -12.365 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    4813000
## Residual Sum of Squares: 2575600
## R-Squared:      0.46486
## Adj. R-Squared: 0.44966
## F-statistic: 152.888 on 1 and 176 DF, p-value: < 2.22e-16
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp + gdp_growth, 
##     data = pdata_growth, model = "within")
## 
## Unbalanced Panel: n = 5, T = 30-41, N = 182
## 
## Residuals:
##      Min.   1st Qu.    Median   3rd Qu.      Max. 
## -208.0798  -29.2035   -7.1115   13.5135  499.7312 
## 
## Coefficients:
##                     Estimate Std. Error t-value  Pr(>|t|)    
## fiscal_balance_gdp -1.829994   0.429411 -4.2616  3.31e-05 ***
## gdp_growth          0.132257   0.013294  9.9487 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    4813000
## Residual Sum of Squares: 1645200
## R-Squared:      0.65819
## Adj. R-Squared: 0.64647
## F-statistic: 168.488 on 2 and 175 DF, p-value: < 2.22e-16
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp + inflation, 
##     data = pdata_infl, model = "within")
## 
## Unbalanced Panel: n = 5, T = 30-41, N = 182
## 
## Residuals:
##      Min.   1st Qu.    Median   3rd Qu.      Max. 
## -405.8859  -42.1650   -7.8062   29.2804  732.9963 
## 
## Coefficients:
##                     Estimate Std. Error  t-value  Pr(>|t|)    
## fiscal_balance_gdp -4.372791   0.324222 -13.4870 < 2.2e-16 ***
## inflation           0.568916   0.063287   8.9895 3.961e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    4813000
## Residual Sum of Squares: 1762000
## R-Squared:      0.63391
## Adj. R-Squared: 0.62136
## F-statistic: 151.515 on 2 and 175 DF, p-value: < 2.22e-16
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp + resource_rents_gdp, 
##     data = pdata_rents, model = "within")
## 
## Unbalanced Panel: n = 5, T = 10-32, N = 126
## 
## Residuals:
##     Min.  1st Qu.   Median  3rd Qu.     Max. 
## -64.2830 -12.0467  -4.7923   8.9599  79.9744 
## 
## Coefficients:
##                    Estimate Std. Error  t-value Pr(>|t|)    
## fiscal_balance_gdp -3.50465    0.24269 -14.4411  < 2e-16 ***
## resource_rents_gdp -0.40414    0.21206  -1.9058  0.05909 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    162730
## Residual Sum of Squares: 59097
## R-Squared:      0.63683
## Adj. R-Squared: 0.61852
## F-statistic: 104.337 on 2 and 119 DF, p-value: < 2.22e-16
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp + gdp_growth + 
##     inflation + resource_rents_gdp, data = pdata_all, model = "within")
## 
## Unbalanced Panel: n = 5, T = 10-32, N = 126
## 
## Residuals:
##      Min.   1st Qu.    Median   3rd Qu.      Max. 
## -62.34307  -8.89105  -0.68279   9.43590  75.29523 
## 
## Coefficients:
##                     Estimate Std. Error t-value  Pr(>|t|)    
## fiscal_balance_gdp -2.205368   0.330406 -6.6747 8.713e-10 ***
## gdp_growth          0.115790   0.037841  3.0599  0.002746 ** 
## inflation           0.353625   0.055842  6.3326 4.630e-09 ***
## resource_rents_gdp -0.260794   0.183550 -1.4208  0.158023    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    162730
## Residual Sum of Squares: 42905
## R-Squared:      0.73634
## Adj. R-Squared: 0.71831
## F-statistic: 81.6873 on 4 and 117 DF, p-value: < 2.22e-16

We keep the global model (no Norway) and add one control at a time. The summary for the global model (as presented previously)

summary(model_debt_fb_no_norway) 
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp, data = df_reg_no_norway, 
##     model = "within", index = c("country", "year"))
## 
## Unbalanced Panel: n = 5, T = 30-41, N = 182
## 
## Residuals:
##     Min.  1st Qu.   Median  3rd Qu.     Max. 
## -459.887  -48.656  -18.474   17.520  758.398 
## 
## Coefficients:
##                    Estimate Std. Error t-value  Pr(>|t|)    
## fiscal_balance_gdp -4.78468    0.38696 -12.365 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    4813000
## Residual Sum of Squares: 2575600
## R-Squared:      0.46486
## Adj. R-Squared: 0.44966
## F-statistic: 152.888 on 1 and 176 DF, p-value: < 2.22e-16

Controlling for Growth

summary(model_debt_fb_gdp)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp + gdp_growth, 
##     data = pdata_growth, model = "within")
## 
## Unbalanced Panel: n = 5, T = 30-41, N = 182
## 
## Residuals:
##      Min.   1st Qu.    Median   3rd Qu.      Max. 
## -208.0798  -29.2035   -7.1115   13.5135  499.7312 
## 
## Coefficients:
##                     Estimate Std. Error t-value  Pr(>|t|)    
## fiscal_balance_gdp -1.829994   0.429411 -4.2616  3.31e-05 ***
## gdp_growth          0.132257   0.013294  9.9487 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    4813000
## Residual Sum of Squares: 1645200
## R-Squared:      0.65819
## Adj. R-Squared: 0.64647
## F-statistic: 168.488 on 2 and 175 DF, p-value: < 2.22e-16

Controlling for inflation

summary(model_debt_fb_infl)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp + inflation, 
##     data = pdata_infl, model = "within")
## 
## Unbalanced Panel: n = 5, T = 30-41, N = 182
## 
## Residuals:
##      Min.   1st Qu.    Median   3rd Qu.      Max. 
## -405.8859  -42.1650   -7.8062   29.2804  732.9963 
## 
## Coefficients:
##                     Estimate Std. Error  t-value  Pr(>|t|)    
## fiscal_balance_gdp -4.372791   0.324222 -13.4870 < 2.2e-16 ***
## inflation           0.568916   0.063287   8.9895 3.961e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    4813000
## Residual Sum of Squares: 1762000
## R-Squared:      0.63391
## Adj. R-Squared: 0.62136
## F-statistic: 151.515 on 2 and 175 DF, p-value: < 2.22e-16

Controlling for Natural resource rents

summary(model_debt_fb_rents)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp + resource_rents_gdp, 
##     data = pdata_rents, model = "within")
## 
## Unbalanced Panel: n = 5, T = 10-32, N = 126
## 
## Residuals:
##     Min.  1st Qu.   Median  3rd Qu.     Max. 
## -64.2830 -12.0467  -4.7923   8.9599  79.9744 
## 
## Coefficients:
##                    Estimate Std. Error  t-value Pr(>|t|)    
## fiscal_balance_gdp -3.50465    0.24269 -14.4411  < 2e-16 ***
## resource_rents_gdp -0.40414    0.21206  -1.9058  0.05909 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    162730
## Residual Sum of Squares: 59097
## R-Squared:      0.63683
## Adj. R-Squared: 0.61852
## F-statistic: 104.337 on 2 and 119 DF, p-value: < 2.22e-16

Controlling for All control toghether

summary(model_debt_fb_controls)
## Oneway (individual) effect Within Model
## 
## Call:
## plm(formula = gov_debt_gdp ~ fiscal_balance_gdp + gdp_growth + 
##     inflation + resource_rents_gdp, data = pdata_all, model = "within")
## 
## Unbalanced Panel: n = 5, T = 10-32, N = 126
## 
## Residuals:
##      Min.   1st Qu.    Median   3rd Qu.      Max. 
## -62.34307  -8.89105  -0.68279   9.43590  75.29523 
## 
## Coefficients:
##                     Estimate Std. Error t-value  Pr(>|t|)    
## fiscal_balance_gdp -2.205368   0.330406 -6.6747 8.713e-10 ***
## gdp_growth          0.115790   0.037841  3.0599  0.002746 ** 
## inflation           0.353625   0.055842  6.3326 4.630e-09 ***
## resource_rents_gdp -0.260794   0.183550 -1.4208  0.158023    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Total Sum of Squares:    162730
## Residual Sum of Squares: 42905
## R-Squared:      0.73634
## Adj. R-Squared: 0.71831
## F-statistic: 81.6873 on 4 and 117 DF, p-value: < 2.22e-16

Next step would be to compare Suriname’s regression results (OLS with controls) to these global coefficients, that way, it can be tested to what extend Suriname differs.

# Suriname-only regression with controls
df_sur_all <- panel_ext %>%
  filter(country == "Suriname") %>%
  select(year, gov_debt_gdp, fiscal_balance_gdp, gdp_growth, inflation, resource_rents_gdp) %>%
  filter(!is.na(gov_debt_gdp) & !is.na(fiscal_balance_gdp) &
           !is.na(gdp_growth) & !is.na(inflation) & !is.na(resource_rents_gdp))

model_sur_controls <- lm(gov_debt_gdp ~ fiscal_balance_gdp + gdp_growth + inflation + resource_rents_gdp, data = df_sur_all)
summary(model_sur_controls)
## 
## Call:
## lm(formula = gov_debt_gdp ~ fiscal_balance_gdp + gdp_growth + 
##     inflation + resource_rents_gdp, data = df_sur_all)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -30.0023  -6.3675   0.2025   4.5000  22.9407 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        13.55650    6.58605   2.058   0.0493 *  
## fiscal_balance_gdp -2.48153    0.69174  -3.587   0.0013 ** 
## gdp_growth         -1.23679    0.54712  -2.261   0.0321 *  
## inflation           0.38829    0.05772   6.727 3.19e-07 ***
## resource_rents_gdp  0.07451    0.26801   0.278   0.7831    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.06 on 27 degrees of freedom
## Multiple R-squared:  0.8335, Adjusted R-squared:  0.8089 
## F-statistic:  33.8 on 4 and 27 DF,  p-value: 3.771e-10
summary(model_sur_controls)
## 
## Call:
## lm(formula = gov_debt_gdp ~ fiscal_balance_gdp + gdp_growth + 
##     inflation + resource_rents_gdp, data = df_sur_all)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -30.0023  -6.3675   0.2025   4.5000  22.9407 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        13.55650    6.58605   2.058   0.0493 *  
## fiscal_balance_gdp -2.48153    0.69174  -3.587   0.0013 ** 
## gdp_growth         -1.23679    0.54712  -2.261   0.0321 *  
## inflation           0.38829    0.05772   6.727 3.19e-07 ***
## resource_rents_gdp  0.07451    0.26801   0.278   0.7831    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.06 on 27 degrees of freedom
## Multiple R-squared:  0.8335, Adjusted R-squared:  0.8089 
## F-statistic:  33.8 on 4 and 27 DF,  p-value: 3.771e-10